package com.ego.service.impl;

import com.ego.commons.pojo.EgoResult;
import com.ego.dubbo.service.TbItemParamItemDubboService;
import com.ego.pojo.TbItemParamItem;
import com.ego.service.TbItemParamItemService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

/**
 * @Title
 * @Author Lyg
 * @Description:
 */
@Service
public class TbItemParamItemServiceImpl implements TbItemParamItemService {
    @DubboReference
    private TbItemParamItemDubboService tbItemParamItemDubboService;
    @Override
    public EgoResult itemParmItemQueryByItemId(long itemId) {
        TbItemParamItem tbItemParamItem = null;
        try {
            tbItemParamItem = tbItemParamItemDubboService.selectByItemId(itemId);
            return EgoResult.ok(tbItemParamItem);
        } catch (Exception e) {
            e.printStackTrace();
            return EgoResult.error("查询规格参数失败");
        }
    }
}
